<%@ page language="java" contentType="text/html; charset=utf-8"  pageEncoding="utf-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()+ path + "/";		
%>
<html>
	<head>
		<title>字典管理的录入</title>
	     <base target="_self" />
		 <jsp:include page="../common/init.jsp"></jsp:include>	
	</head>
	<script type="text/javascript">
		//取消提示信息
		function cancelMessage(){
			if(document.getElementById("messageId")){
				var messageSpanId = document.getElementById("messageId");
				messageSpanId.innerHTML = "";
			}
		}
	
		//验证代码
		function validateDm(){
			var flag = false;
			var checkId="dm";
			var checkValue=document.getElementById("dm").value;
			var errorDivId="dmDiv";
			var errorImgId="dmImg";
			var zwmc = document.getElementById('zwmc').value;
			if(checkNullValue(checkValue))
			{
				showMenuDelegate(checkId,errorDivId,errorImgId,"代码不能为空!");
				flag = false;
			}else{
				hiddenErrorImg(errorImgId);
				flag= true;
			}
			return flag;
		}

		//页面关闭
		function winClose()
		{
			window.returnValue = "ok";
			window.close();
		}
	     
		//提交
		function doSubmit()
		{
			if(validateDm())
			{
				document.forms[0].action="createDmb.do";
				document.forms[0].submit();
			}
			else
			{
				return false;
			}
		}
		//生成功能按钮	
		mpmenu1=new mMenu('','winClose()','script','<%=request.getContextPath() %>/images/img_ht_wz_44.gif','62','24','0','100','2');		
		</script>
	  <body onload="showMessage()">
		<form action="" name="frm">
			<input type="hidden" name="appsysDmb.dmlx" value="${dmlx}"/>
			<table cellspacing="0" cellpadding="0" class="main_tab1" onclick="cancelMessage();">
				<tr>
					<td rowspan="4" class="main_tab1_td8">&nbsp;</td>
					<td class="main_tab1_td1"><img src="<%=path%>/images/img_ht_wz_28.gif" alt="left" /></td>
					<td class="main_tab1_td2">
						<div id="location"> 字典管理的录入</div>
						<div id="funbut">
			                <SCRIPT>document.write(mwritetodocument());</SCRIPT>
		                </div>
					</td>
					<td class="main_tab1_td1"><img src="<%=path%>/images/img_ht_wz_32.gif" alt="right" /></td>
				</tr>
				<tr>
					<td colspan="3" class="main_tab1_td3">
						<div id="mainbg">
						    <div class="jiange10"></div>							
							<table width="100%" border="0" cellspacing="0" cellpadding="0" class="main_tab3">
							    <tr valign="bottom" height="30">
									<td height="25" colspan="4" align="left" valign="bottom" class="r_tab_c_4">
										<div id="infoMessage"></div>
									</td>
								</tr>
								<tr valign="bottom" align="center" height="30">
									<th align="right">代码：</th>
									<td align="left">
										<input type="text" id="dm" name="appsysDmb.dm"
											size="10" maxLength="20"  
											onclick="javascript: mouseClick('dmDiv')"
											onfocus="this.style.borderColor='#68A6F5'"
											onblur="validateDm();" class="inp_02">
										&nbsp;
										<font color="#ff0000">*</font>
										<img src="" id="dmImg" style="display: none;" />
										<div id="dmDiv" style="background: #008080; display: none; cursor: default"></div>
									</td>
									<th align="right">中文名称：</th>
									<td align="left">
										<input type="text" id="zwmc" name="appsysDmb.zwmc"
											size="25" maxLength="200" 
											onclick="javascript: mouseClick('zwmcDiv');hiddenErrorImg('zwmcImg');"
											onfocus="this.style.borderColor='#68A6F5'"
											class="inp_02">
											&nbsp;
										<img src="" id="zwmcImg" style="display: none;" />
										<div id="zwmcDiv" style="background: #008080; display: none; cursor: default"></div>
									</td>
								</tr>
							</table>
							<div class="butk">
								<div class="btn_01">
									<a href="#" onclick="doSubmit()">保&nbsp;存</a>
								</div>
								<div class="btn_01">
									<a href="#" onclick="document.forms[0].reset()">清&nbsp;除</a>
								</div>
							</div>
						</div>
					</td>
				</tr>
				<tr>
					<td class="main_tab1_td4"><img src="<%=path%>/images/img_ht_wz_65.gif" alt="left" /></td>
					<td class="main_tab1_td5"></td>
					<td class="main_tab1_td4"><img src="<%=path%>/images/img_ht_wz_67.gif" alt="right" /></td>
				</tr>
				<tr>
					<td colspan="3" class="main_tab1_td7">&nbsp;</td>
				</tr>
			</table>
		</form>
	</body>
</html>
